<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/main.css" />
    <script type="text/javascript" src="../script/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="../script/api.js"></script>
    <script type="text/javascript" src="../script/mobile.js"></script>
    <script type="text/javascript" src="../script/public.js"></script>
    <script type="text/javascript" src="../script/app.js"></script>
    <title>我的</title>
</head>
<body>
<header>
    <div class="headtit">
        <div>
            <!--<img src="../image/arwri.png" alt="">-->
            <p>我的</p>
        </div>
    </div>
</header>

<div class="wodexing">
        <span>
            <p><em id="username"> </em><i id="branch"> </i></p>
            <p id="mobile"> </p>
        </span>
        <p><em id="balance"> </em><!-- <i>.00</i> --></p>
</div>

<div class="nvlsttt">
    <ul>
        <li onclick="open_winrs('wdyd','wode_yudin.html');"><em><img style="width: 0.37rem;height: 0.37rem;" src="../image/wdyd.png" alt=""></em><p>我的预订</p></li>
        <li onclick="open_winrs('xiaofei_mx','xiaofei_mx.html')"><em><img style="width: 0.4rem;height: 0.33rem;" src="../image/xfjl.png" alt=""></em><p>消费记录</p></li>
        <li onclick="open_winrs('congzhi','congzhi_mx.html');"><em><img style="width: 0.38rem;height: 0.36rem;" src="../image/czjl.png" alt=""></em><p>充值记录</p></li>
        <li onclick="open_winrs('xiugai','xiugai_mim.html');"><em><img style="width: 0.38rem;height: 0.38rem;" src="../image/xgmm.png" alt=""></em><p>修改密码</p></li>
        <li onclick="logout()"><em><img style="width: 0.42rem;height: 0.42rem;" src="../image/tcdl.png" alt=""></em><p>退出登录</p></li>
    </ul>
</div>

<div class="ind_nalis">

    <ul>
        <li onclick="open_winrs('index','index.html');">
                <span>
                    <img class="shoede_na" src="../image/shouye1.png" alt="">
                    <img src="../image/shouye.png" alt="">
                    <p>首页</p>
                </span>
        </li>
        <li onclick="open_winrs('resrtion','wode_yudin.html');">
                <span>
                    <img class="shoede_na" src="../image/dind1.png" alt="">
                    <img src="../image/dind.png" alt="">
                    <p>预订</p>
                </span>
        </li>
        <li onclick="open_winrs('imgsg','xiaoxi.html');">
                <span class="xiaoxx" id="unread">
                    <img class="shoede_na" src="../image/xiaox1.png" alt="">
                    <img src="../image/xioax.png" alt="">
                    <p>消息</p>
                   
                </span>
        </li>
        <li class="chek_nvts" onclick="open_winrs('myslf','wode.html');">
                <span>
                    <img class="shoede_na" src="../image/wode1.png" alt="">
                    <img src="../image/wode.png" alt="">
                    <p>我的</p>
                </span>
        </li>
    </ul>
</div>
</body>

<script type="text/javascript">
    window['adaptive'].desinWidth = 750;
    window['adaptive'].baseFont = 28;
    window['adaptive'].maxWidth = 750;
    window['adaptive'].init();

    apiready = function () {
        $api.fixStatusBar($api.dom('.header'));
        api.addEventListener({
            name: 'keyback'
        }, function(ret, err){
            api.closeWidget();
        }); 

        // alert(JSON.stringify(user_data));

        //我的个人消息
        s = {uid:id};
        api.ajax({
            url:webSiteUrl+'/App/user/shop',
            method:'post',
            data:{
                values:s
            }
        },function(ret,err){
            if (ret.code == 200) {
                var list = ret.data;
                $('#username').html(list.username);
                $('#branch').html(list.branch);
                $('#mobile').html(list.mobile);
                $('#balance').html(list.balance);
            }else{
                alert(ret.msg);
            }
        });

        //未读消息
        p = {uid:id};
        api.ajax({
            url:webSiteUrl+'/app/user/message',
            method:'post',
            data:{
                values:p
            }
        },function(ret,err){
            if (ret.code == 200) {
                if (ret.data.unread != 0 ) {
                    $('#unread').html('<img class="shoede_na" src="../image/xiaox1.png" alt=""><img src="../image/xioax.png" alt=""><p>消息</p><em>'+ret.data.unread+'</em>');
                }else{
                    $('#unread').html('<img class="shoede_na" src="../image/xiaox1.png" alt=""><img src="../image/xioax.png" alt=""><p>消息</p>');
                }
            }else{
                alert(ret.msg);
            }
        });  

       
    }
    //退出
    function logout(){
        
            $api.rmStorage('user');
            $api.clearStorage();

            api.openWin({
                name: 'tuichu',
                url: './login.html',
                reload:true,
                pageParam: {
                   name:'text'
                }
            });
 

        
    }
</script>
</html>